<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">-->
    <title>招聘系统</title>

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" media="all" th:href="@{/css/tyle.css}">
    <script th:src="@{/js/jquery-1.9.1.min.js}"></script>
    <style type="text/css">
        .layui-tab-title .layui-this {
            color: #009688;
        }

        .text {
            margin-top: 16px;
            margin-bottom: 16px;
        }

        .list {
            margin-top: 30px;
            margin-left: 100px;
            margin-right: 100px
        }

        body {
            background-color: #ffffff
        }

        .layui-input {
            border-color: #009688;
        }

        .layui-nav {
            padding-left: 10%;
            padding-right: 10%;
        }
    </style>
</head>
<body>

<ul class="layui-nav layui-bg-black">
    <img th:src="@{/images/logo.png}" style="margin-right: 30px">
    <li class="layui-nav-item"><a href="/">网站首页</a></li>
    <li class="layui-nav-item"><a href="/admin">后台管理</a></li>
    <li class="layui-nav-item" style="float: right;">
        <div th:if="${ session.uid != null}">
            <a><img th:src="'/user/img/'+${session.uid}" class="layui-nav-img">我</a>
            <dl class="layui-nav-child">
                <dd><a th:href="'/user/user?id='+ ${session.uid}">个人中心</a></dd>
                <dd><a href="/user/upPass">修改密码</a></dd>
                <dd><a th:href="@{/user/exit}">退出</a></dd>
            </dl>
        </div>
        <div th:if="${session.uid == null}">
            <button class="layui-btn layui-btn-radius layui-btn-sm" onclick="window.location.href='/user/login'">登录
            </button>
            <button class="layui-btn layui-btn-radius layui-btn-sm" onclick="window.location.href='/user/signIn'">注册
            </button>
        </div>
    </li>
</ul>

<br>
<br>
<br>
<br>
<br>
<br>
<br>

<form class="layui-form layui-form-pane1" action="/soso" style="text-align: center" method="post">
    <div class="layui-input-inline" style="width: 100px">
        <select name="place">
            <option value="全部类别">全部类别</option>
            <div th:each="list : ${joblist}">
                <option value="IT互联网" th:value="${list}" th:text="${list}">IT互联网</option>
            </div>
        </select>
    </div>
    <div class="layui-input-inline" style="width: 300px">
        <input type="text" name="name" lay-verify="required|title" required placeholder="请输入你要应聘的职位"
               autocomplete="off"
               class="layui-input"/>
    </div>
    <div class="layui-input-inline">
        <input type="submit" value="搜索" class="layui-btn"/>
    </div>
</form>
<!-- 城市 -->
<div id="in_city" style="display: none"></div>

<br>
<br>
<br>
<br>
<br>
<br>
<br>


<div class="layui-tab">
    <ul class="layui-tab-title" style="text-align: center;">
        <li class="layui-this">最新职位</li>
        <li>最热职位</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show"><!-- 这是Tab第一页 -->
            <div th:each="job,i : ${jobs}">
                    <div class="layui-col-xs6"><!--评分12分之6-->
                        <fieldset class="layui-elem-field layui-field-title list">
                                <legend>
                                    <a th:href="'/job/job?id='+${job.getId()}" th:text="${job.jobName}" style="font-size: 18px"></a>
                                </legend>
                            <div class="layui-row">
                                <div class="layui-col-xs10">
                                    <p class="text">
                                        <a th:href="'/user/user?id='+${job.uid}" style="color: #6aa2e4" th:text="${job.jobComName}">
                                            阿里巴巴</a> - <span th:text="${job.jobClass}">计算机/互联网</span>
                                    </p>
                                    <p class="text">
                                        <span th:text="${job.jobWeekDay}+'天/周'"></span> &nbsp;&nbsp; <span
                                            th:text="${job.jobMoney}+'天'">150/天</span> &nbsp;&nbsp; <span
                                            th:text="${job.jobPosition}">北京</span>
                                    </p>
                                </div>
                                <div class="layui-col-xs2">
                                    <img th:src="'/user/img/'+${job.uid}" style="width: 70px">
                                </div>
                            </div>
                        </fieldset>
                    </div>
            </div>
        </div><!--一-->

        <div class="layui-tab-item"><!--这是Tab第二页-->
            <div th:each="job,i : ${jobt}">
                <div class="layui-col-xs6"><!--评分12分之6-->
                    <fieldset class="layui-elem-field layui-field-title list">
                        <legend>
                            <a th:href="'/job/job?id='+${job.getId()}" th:text="${job.jobName}" style="font-size: 18px"></a>
                        </legend>
                        <div class="layui-row">
                            <div class="layui-col-xs10">
                                <p class="text">
                                    <a th:href="'/user/user?id='+${job.uid}" style="color: #6aa2e4"
                                       th:text="${job.jobComName}">阿里巴巴</a> - <span th:text="${job.jobClass}">计算机/互联网</span>
                                </p>
                                <p class="text">
                                    <span th:text="${job.jobWeekDay}+'天/周'"></span> &nbsp;&nbsp; <span
                                        th:text="${job.jobMoney}+'天'">150/天</span> &nbsp;&nbsp; <span
                                        th:text="${job.jobPosition}">北京</span>
                                </p>
                            </div>
                            <div class="layui-col-xs2">
                                <img th:src="'/user/img/'+${job.uid}" style="width: 70px">
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div><!--二-->

    </div>
</div>


<script th:src="@{/layui/layui.all.js}"></script>
<script>
    //由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
    ;!function () {
        var layer = layui.layer
            , form = layui.form;

        // layer.msg('Hello World');
    }();
</script>
<script type="text/javascript" th:src="@{/js/cityTemplate.js}"></script>
<script type="text/javascript">

    var cityA = $(".city_a_le1 a"); //城市
    var pla = $("#place");  //出发地
    var dest = $("#destination");  //目的地
    // 默认值
    inCity.width = "345";  //城市选择框  宽
    inCity.height = "auto";  //城市选择框  高
    inCity.id = "#in_city";  //城市选择框  父级ID
    inCity.Children = '.city_a_le1';  //城市名box
    // 初始化 城市HTML模板
    $(inCity.id).prepend(inCity._template.join(''));
    inCity.Hot(cityA);

    //城市 导航
    var apay = $(".screen a");

    var placeThis; //当前选择标签
    apay.click(function (obj) {  //城市导航
        inCity.payment($(this));
    })

    inCity.place(pla); //出发地
    inCity.destination(dest);  //目的地
    inCity.cityClick(cityA); //显示赋值城市
</script>
</body>
</html>
